﻿<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage/List2.Master" AutoEventWireup="true" CodeBehind="ProjectCompleteInfo.aspx.cs" Inherits="Honestysoft.Financing.WebUI.Module.Project.ProjectCompleteInfo" %>

<asp:Content ID="Content1" ContentPlaceHolderID="head" runat="server">
<script language="javascript" type="text/javascript">
    //展开收起操作
    function change(objID) {
        if (document.all("tb_" + objID).style.display == "block") {
            document.all("img_" + objID).src = "../../images/ico_have2.gif";
            document.all("img_" + objID).alt = "展开";
            document.all("tb_" + objID).style.display = "none"
        }
        else {
            document.all("img_" + objID).src = "../../images/ico_nohave2.gif";
            document.all("img_" + objID).alt = "收起";
            document.all("tb_" + objID).style.display = "block"
        }
    }
    function doConfirm(id) {
        window.showModalDialog('ProjectConfirm.aspx?ID='+id+'&FunctionID=<%=Request["FunctionID"] %>', window, 'dialogHeight=500px;dialogWidth=560px;help=no;scrollbars=no;status=no');
        return false;
    }
</script>
<style type="text/css">
div
{
    font-size:12px;font-weight:700;
}
</style>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <div style="color:Blue;font-weight:normal">
        说明:（1）点击<img id="img2" alt='' src="../../images/ico_have2.gif" /><img id="img1" alt='' src="../../images/ico_nohave2.gif" />可展开该项查看详细信息或折叠该项隐藏详细信息。<br />
        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;（2）确认初始化后，该项目的编号、名称、项目单位、建设单位、总投资(项目概算)、财政累计投资信息将不可再修改。
    </div>
    <div class="button_area">
        <asp:Button runat="server" ID="btnEdit" Text="修改项目信息" class="btn_big_normal" onmouseover="this.className='btn_big_active'" onmouseout="this.className='btn_big_normal'" />
        <asp:Button runat="server" ID="btnConfirm" Text="确认初始化"  class="btn_big_normal" onmouseover="this.className='btn_big_active'" onmouseout="this.className='btn_big_normal'" />
        <asp:Button runat="server" ID="btnViewConfirm" Text="查看确认意见"  class="btn_big_normal" onmouseover="this.className='btn_big_active'" onmouseout="this.className='btn_big_normal'" />
    </div>


    <div>
                    <img id="img_1" alt="收起" onclick="change('1')" style="vertical-align:middle"
                            src="../../images/ico_nohave2.gif" />
                            <span style="vertical-align:middle;cursor:hand" onclick="change('1')">项目基本信息</span>
                    </div>


                    <table id="tb_1" border="0" cellpadding="0" cellspacing="0" class="tEdit" 
                        style="display: block;" width="100%">
                        <tr>
                            <th style="width: 120px">
                                编号 
                            </th>
                            <td>
                            <%=_ProjectSN%>
                            </td>
                        </tr>
                        <tr>
                            <th>
                                项目名称</th>
                            <td>
                                <%=_ProjectName%>
                            </td>
                        </tr>
                        <tr>
                            <th>
                                项目代码 
                            </th>
                            <td>
                            <%=_ProjectCode%>
                            </td>
                        </tr>
                        <tr>
                            <th>
                                项目单位 
                            </th>
                            <td>
                                <%=_Owner971%>
                            </td>
                        </tr>
                        <tr>
                            <th>
                                建设单位</th>
                            <td>
                                <%=_Owner%>
                            </td>
                        </tr>
                        <tr>
                            <th>
                                 总投资(项目概算)
                            </th>
                            <td>
                                <%=_ztz %>
                            </td>
                        </tr>
                        <tr>
                            <th>
                                财政累计投资</th>
                            <td>
                                <%=_czljtz %>
                            </td>
                        </tr>
                        <tr>
                            <th>
                                资本金到位金额</th>
                            <td>
                                <%=_zbjdwje %>
                            </td>
                        </tr>
                    </table><div style="height:8px"></div>
                    <div>
                        <img id="img_2" alt="展开" onclick="change('2')"  style="vertical-align:middle"
                            src="../../images/ico_have2.gif" />
                            <span style="vertical-align:middle;cursor:hand" onclick="change('2')">项目概算变动</span>
                    </div>
                   <table cellpadding="0"  cellspacing="0" border="1" class="t4" id="tb_2" style="display:none;padding-left:20px;">
		                <thead> 
                            <th align="center" width="120px">原概算金额(元)</th>
                            <th align="center" width="120px">变动后概算金额(元)</th>
                            <th align="center"  width="80px">变动日期</th>
                            <th align="center" width="60px">登记人</th>
                            <th align="center" width="120px">登记时间</th>
                            <th width="40px">操作</th>
      	                </thead>           
		                <asp:Repeater runat="server" ID="rptBudget">
			                <ItemTemplate>
				                <tr>
					                <td align="right"><%# string.Format("{0:0.00}", DataBinder.Eval(Container.DataItem, "SourceMoney"))%></td>
					                <td align="right"><%# string.Format("{0:0.00}",  DataBinder.Eval(Container.DataItem,"ChangeMoney")) %></td>
					                <td align="center"><%# string.Format("{0:yyyy-MM-dd}",  DataBinder.Eval(Container.DataItem,"ChangeDate")) %></td>
					                <td align="center"><%#  DataBinder.Eval(Container.DataItem,"SponsorName") %></td>
					                <td align="center"><%# string.Format("{0:yyyy-MM-dd HH:mm:ss}",   DataBinder.Eval(Container.DataItem,"CreateTime")) %></td>
					                <td align="center">
						                <%# GetBudgetButtonScript(DataBinder.Eval(Container.DataItem, "ID") + "")%>
					                </td>
				                </tr>
			                </ItemTemplate>
		                </asp:Repeater>
                    </table>
                   <div style="height:8px"></div>

                      <div>
                        <img id="img_3" alt="展开" onclick="change('3')"  style="vertical-align:middle"
                            src="../../images/ico_have2.gif" />
                            <span style="vertical-align:middle;cursor:hand" onclick="change('3')">年度投资计划</span>
                    </div>
                   <table cellpadding="0" cellspacing="0" border="1" class="t4" id="tb_3" style="display:none">
		                <thead> 
                            <th align="center" width="60px">投资年度</th>
                            <th align="center" width="140px">投资计划(元)</th>
                            <th align="center" width="60px">登记人</th>
                            <th align="center" width="120px">登记时间</th>
                            <th width="40px">操作</th>
      	                </thead>           
		                <asp:Repeater runat="server" ID="rptYearPlan">
			                <ItemTemplate>
				                <tr>
					                <td align="center"><%#  DataBinder.Eval(Container.DataItem,"PlanYear") %></td>
					                <td align="right"><%#string.Format("{0:0.00}",  DataBinder.Eval(Container.DataItem,"Amount")) %></td>
					                <td align="center"><%#  DataBinder.Eval(Container.DataItem,"SponsorName") %></td>
					                <td align="center"><%# string.Format("{0:yyyy-MM-dd HH:mm:ss}",   DataBinder.Eval(Container.DataItem,"CreateTime")) %></td>
					                <td align="center">
						                <%# GetYearPlanButtonScript(DataBinder.Eval(Container.DataItem,"ID")+"") %>
					                </td>
				                </tr>  
			                </ItemTemplate>
		                </asp:Repeater>
                    </table><div style="height:8px"></div>

             <div>
                        <img id="img_4" alt="展开" onclick="change('4')"  style="vertical-align:middle"
                            src="../../images/ico_have2.gif" />
                             <span style="vertical-align:middle;cursor:hand" onclick="change('4')">项目贷款额度</span>
                    </div>
                <table cellpadding="0" cellspacing="0" border="1" class="t4" id="tb_4" style="display:none">
		            <thead>  
                        <th align="center" width="60px">年度</th>
                        <th align="center" width="140px">贷款额度</th>
                        <th align="center" width="60px">登记人</th>
                        <th align="center" width="120px">登记时间</th>
                        <th width="40px">操作</th>
      	            </thead>           
		            <asp:Repeater runat="server" ID="rptProjAmount">
			            <ItemTemplate>
				            <tr>
					            <td align="center"><%#  DataBinder.Eval(Container.DataItem,"TheYear") %></td>
					            <td align="right"><%# string.Format("{0:0.00}", DataBinder.Eval(Container.DataItem,"Amount")) %></td>
					            <td align="center"><%#  DataBinder.Eval(Container.DataItem,"SponsorName") %></td>
					            <td align="center"><%#  string.Format("{0:yyyy-MM-dd HH:mm:ss}",DataBinder.Eval(Container.DataItem,"CreateTime")) %></td>
					            <td align="center">
						            <%# GetProjAmountButtonScript(DataBinder.Eval(Container.DataItem,"ID")+"") %>
					            </td>
				            </tr>  
			            </ItemTemplate>
		            </asp:Repeater>
                </table><div style="height:8px"></div>

        <div>
                        <img id="img_5" alt="展开" onclick="change('5')"  style="vertical-align:middle"
                            src="../../images/ico_have2.gif" />
                            <span style="vertical-align:middle;cursor:hand" onclick="change('5')">国开行贷款额度</span>
                    </div>
                    <table cellpadding="0"  cellspacing="0" border="1" class="t4" id="tb_5" style="display:none">
		<thead>  
            <th align="center" width="60px">年度</th>
            <th align="center" width="140px">贷款额度</th>
            <th align="center" width="60px">登记人</th>
            <th align="center" width="120px">登记时间</th>
            <th width="40px">操作</th>
      	</thead>           
		<asp:Repeater runat="server" ID="rptGKAmount">
			<ItemTemplate>
				<tr>
					<td align="center"><%#  DataBinder.Eval(Container.DataItem,"TheYear") %></td>
					<td align="right"><%# string.Format("{0:0.00}", DataBinder.Eval(Container.DataItem,"Amount")) %></td>
					<td align="center"><%#  DataBinder.Eval(Container.DataItem,"SponsorName") %></td>
					<td align="center"><%#  string.Format("{0:yyyy-MM-dd HH:mm:ss}",DataBinder.Eval(Container.DataItem,"CreateTime")) %></td>
					<td align="center">
						<%# GetGKAmountButtonScript(DataBinder.Eval(Container.DataItem,"ID")+"") %>
					</td>
				</tr>  
			</ItemTemplate>
		</asp:Repeater>
    </table><div style="height:8px"></div>
    <div>
                        <img id="img_6" alt="展开" onclick="change('6')"  style="vertical-align:middle"
                            src="../../images/ico_have2.gif" />
                            <span style="vertical-align:middle;cursor:hand" onclick="change('6')">新增资本金</span>
                    </div>
                    <table cellpadding="0" cellspacing="0" border="1" class="t4" id="tb_6" style="display:none">
		<thead>  
            <th align="center" width="120px">新增资本金</th>
            <th align="center" width="80px">新增日期</th>
            <th align="center" width="60px">登记人</th>
            <th align="center" width="120px">登记时间</th>
            <th width="60px">操作</th>
      	</thead>           
		<asp:Repeater runat="server" ID="rptXZZBJ">
			<ItemTemplate>
				<tr>
					<td align="right"><%# string.Format("{0:0.00}", DataBinder.Eval(Container.DataItem,"Amount")) %></td>
					<td align="center"><%# string.Format("{0:yyyy-MM-dd}", DataBinder.Eval(Container.DataItem,"AddDate")) %></td>
					<td align="center"><%#  DataBinder.Eval(Container.DataItem,"SponsorName") %></td>
					<td align="center"><%# string.Format("{0:yyyy-MM-dd HH:mm:ss}",  DataBinder.Eval(Container.DataItem,"CreateTime")) %></td>
					<td align="center">
						<%# GetAddAmountButtonScript(DataBinder.Eval(Container.DataItem,"ID")+"") %>
					</td>
				</tr>  
			</ItemTemplate>
		</asp:Repeater>
    </table>


    
    <!--必填项检查 -->
    <asp:HiddenField runat="server" ID="hidSN" Value="0" />
    <asp:HiddenField runat="server" ID="hidCode"  Value="0"/>
    <asp:HiddenField runat="server" ID="hidName"  Value="0"/>
    <asp:HiddenField runat="server" ID="hidOwner971"  Value="0"/>
    <asp:HiddenField runat="server" ID="hidOwner"  Value="0"/>
    <asp:HiddenField runat="server" ID="hidZTZ"  Value="0"/>
    <asp:HiddenField runat="server" ID="hidCZLJTZ"  Value="0"/>
    <asp:HiddenField runat="server" ID="hidZBJDWJE"  Value="0"/>
    <asp:HiddenField runat="server" ID="hidYearPlan"  Value="0"/>
    <asp:HiddenField runat="server" ID="hidProjLoadAmount"  Value="0"/>
    <asp:HiddenField runat="server" ID="hidGKLoadAmount"  Value="0"/>
    
    <script language="javascript" type="text/javascript">
        function checkRequired() {
            if (getIsEmpty('<%=hidSN.ClientID %>')) {
                alert("项目编号不能为空！请修改项目信息完善此数据！");
                return false;
            }
            if (getIsEmpty('<%=hidCode.ClientID %>')) {
                alert("项目代码不能为空！请修改项目信息完善此数据！");
                return false;
            }
            if (getIsEmpty('<%=hidName.ClientID %>')) {
                alert("项目名称不能为空！请修改项目信息完善此数据！");
                return false;
            }
            if (getIsEmpty('<%=hidOwner971.ClientID %>')) {
                alert("项目单位不能为空！请修改项目信息完善此数据！");
                return false;
            }
            if (getIsEmpty('<%=hidOwner.ClientID %>')) {
                alert("建设单位不能为空！请修改项目信息完善此数据！");
                return false;
            }
            if (getIsEmpty('<%=hidZTZ.ClientID %>')) {
                alert("总投资不能为空！请修改项目信息完善此数据！");
                return false;
            }
            
            if (getIsEmpty('<%=hidZBJDWJE.ClientID %>')) {
                alert("资本金到位金额不能为空！请修改项目信息完善此数据！");
                return false;
            }
            if (getIsEmpty('<%=hidYearPlan.ClientID %>')) {
                alert("缺少年度投资计划记录！请增加各年度投资计划！");
                return false;
            }
            if (getIsEmpty('<%=hidProjLoadAmount.ClientID %>')) {
                alert("缺少项目贷款额度记录！请增加各年度项目贷款额度！");
                return false;
            }
            if (getIsEmpty('<%=hidGKLoadAmount.ClientID %>')) {
                alert("缺少国开行贷款额度记录！请增加各年度国开行贷款额度！");
                return false;
            }
            return true;
        }
        function getIsEmpty(ctrlId) {
            if (document.getElementById(ctrlId).value == "0") {
                return true;
            }
            return false;
        }
    </script>
</asp:Content>
